package com.xu.fountain.Entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "fountain_balance", schema = "fountain", catalog = "")
public class FountainBalanceEntity {
    private int id;
    private Integer agentid;
    private Integer paymethod;
    private String content;
    private String num;
    private Integer facilityid;
    private Timestamp addtime;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "agentid")
    public Integer getAgentid() {
        return agentid;
    }

    public void setAgentid(Integer agentid) {
        this.agentid = agentid;
    }

    @Basic
    @Column(name = "paymethod")
    public Integer getPaymethod() {
        return paymethod;
    }

    public void setPaymethod(Integer paymethod) {
        this.paymethod = paymethod;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "num")
    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    @Basic
    @Column(name = "facilityid")
    public Integer getFacilityid() {
        return facilityid;
    }

    public void setFacilityid(Integer facilityid) {
        this.facilityid = facilityid;
    }

    @Basic
    @Column(name = "addtime")
    public Timestamp getAddtime() {
        return addtime;
    }

    public void setAddtime(Timestamp addtime) {
        this.addtime = addtime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FountainBalanceEntity that = (FountainBalanceEntity) o;
        return id == that.id &&
                Objects.equals(agentid, that.agentid) &&
                Objects.equals(paymethod, that.paymethod) &&
                Objects.equals(content, that.content) &&
                Objects.equals(num, that.num) &&
                Objects.equals(facilityid, that.facilityid) &&
                Objects.equals(addtime, that.addtime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, agentid, paymethod, content, num, facilityid, addtime);
    }
}
